<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__CSS__/layui.css">
    <link rel="stylesheet" href="__CSS__/view.css"/>
    <link rel="icon" href="/favicon.ico">
    <title>个人资料</title>
</head>
<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-page-header">
            <div class="pagewrap">
                <span class="layui-breadcrumb">
                  <a href="">首页</a>
                  <a href="">个人资料</a>
                  <a><cite>个人基本信息</cite></a>
                </span>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-card">
                <div class="layui-card-header">我的资料</div>
                <form id="doform" class="layui-form layui-card-body" action="">
                  <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block">
                      <input type="text" required="" lay-verify="required" disabled autocomplete="off" value="{$userinfo.user_account}" class="layui-input">
                    </div>
                  </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                      <input type="text" name="user_name" required="" lay-verify="required" placeholder="" autocomplete="off" value="{$userinfo.user_name}" class="layui-input">
                    </div>
                  </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-block">
                      <input type="text" name="user_phone" required="" lay-verify="required" placeholder="" autocomplete="off" value="{$userinfo.user_phone}" class="layui-input">
                    </div>
                  </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">身份证</label>
                    <div class="layui-input-block">
                      <input type="text" name="user_idcard" required="" value="{$userinfo.user_idcard}" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <a class="layui-btn layui-btn-blue" lay-submit="" id="formDemo">保存</a>
                      <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
                    </div>
                  </div>
                </form>  
            </div>
        </div>
    </div>
    <script src="__JS__/layui.all.js"></script>
    <script src="__JS__/jquery.min.js"></script>

    <script>
      $('#formDemo').click(function(){
          var urls = "{:Url('User/info')}";
          var data = $('#doform').serialize();
          $.post(urls, data, function(e){
              if(e.error==0){
                  layer.msg(e.msg);
              }
          });
      });
    </script>

</body></html>